package activity;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.widget.TextView;

import com.example.horace.R;

public class ResultatCalculActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_resultat_calcul);
		Intent intent = getIntent();
		float nombre = intent.getFloatExtra(MainActivity.EXTRA_MESSAGE, 0);
		int nombreRounded = java.lang.Math.round(nombre);
		float surface = intent.getFloatExtra("SURFACE", 0);
		TextView tvSurface = (TextView) findViewById(R.id.surface);
		tvSurface.setText(Float.toString(surface));
		TextView nombreLame= (TextView) findViewById(R.id.nombreLame);
		nombreLame.setText(Integer.toString(nombreRounded));
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.resultat_calcul, menu);
		return true;
	}

}
